home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / pcl / src-16f.lha / compiler / sparc / pred.lisp < prev    next >
Encoding:
Text File  |  1991-11-06  |  1.2 KB  |  47 lines

  1. ;;; -*- Package: SPARC -*-
  2. ;;;
  3. ;;; **********************************************************************
  4. ;;; This code was written as part of the Spice Lisp project at
  5. ;;; Carnegie-Mellon University, and has been placed in the public domain.
  6. ;;; If you want to use this code or any part of Spice Lisp, please contact
  7. ;;; Scott Fahlman (FAHLMAN@CMUC). 
  8. ;;; **********************************************************************
  9. ;;;
  10. ;;; $Header: pred.lisp,v 1.1 90/11/30 17:04:59 wlott Exp $
  11. ;;;
  12. ;;;    This file contains the VM definition of predicate VOPs for the SPARC.
  13. ;;;
  14. ;;; Written by Rob MacLachlan
  15. ;;;
  16. ;;; Converted by William Lott.
  17. ;;; 
  18.  
  19. (in-package "SPARC")
  20.  
  21.  
  22. ;;;; The Branch VOP.
  23.  
  24. ;;; The unconditional branch, emitted when we can't drop through to the desired
  25. ;;; destination.  Dest is the continuation we transfer control to.
  26. ;;;
  27. (define-vop (branch)
  28.   (:info dest)
  29.   (:generator 5
  30.     (inst b dest)
  31.     (inst nop)))
  32.  
  33.  
  34. ;;;; Conditional VOPs:
  35.  
  36. (define-vop (if-eq)
  37.   (:args (x :scs (any-reg descriptor-reg zero null))
  38.      (y :scs (any-reg descriptor-reg zero null)))
  39.   (:conditional)
  40.   (:info target not-p)
  41.   (:policy :fast-safe)
  42.   (:translate eq)
  43.   (:generator 3
  44.     (inst cmp x y)
  45.     (inst b (if not-p :ne :eq) target)
  46.     (inst nop)))
  47.